package org.bspv.pharma.manager.impl;

import java.util.List;

import org.bspv.pharma.dao.OrderDAO;
import org.bspv.pharma.manager.OrderManager;
import org.bspv.pharma.model.Drugstore;
import org.bspv.pharma.model.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "orderManager")
public class OrderManagerImpl extends AbstractManagerImpl<Order, Long>
		implements OrderManager {

	@Autowired
	public OrderManagerImpl(OrderDAO dao) {
		super(dao);
	}

	public List<Order> findOrders() {
		return ((OrderDAO) dao).findOrders();
	}

	public List<Order> findRecentOrders() {
		return ((OrderDAO) dao).findRecentOrders();
	}

    @Override
    public List<Order> findCurrentOrders(Drugstore drugstore) {
        return ((OrderDAO) dao).findCurrentOrders(drugstore);
    }

}
